feat(commands): add buildRouteMap wrapper with standard subcommand aliases#690
feat(commands): add buildRouteMap wrapper with standard subcommand aliases#690
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
|
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 1488 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.44% 95.43% -0.01%
==========================================
Files 223 224 +1
Lines 32511 32538 +27
Branches 0 0 —
==========================================
+ Hits 31027 31050 +23
- Misses 1484 1488 +4
- Partials 0 0 —Generated by Codecov Action |
f944e25 to
a17e0ef
Compare
ls as alias for list across all route groups…iases Introduce `src/lib/route-map.ts` as the single entry point for building route maps — analogous to how `src/lib/command.ts` wraps Stricli's `buildCommand`. The wrapper auto-injects standard aliases based on which route keys exist: list → ls view → show delete → remove, rm create → new All 16 command group index.ts files and app.ts now import from the wrapper instead of @stricli/core directly. Manual aliases that are covered by the standard set have been removed. Also update `getSubcommandsForRoute()` in list-command.ts to collect subcommand aliases so plural+alias combos like `sentry issues ls` are properly intercepted.
67c9b17 to
d4fb1cd
Compare
8b8d1fb to
7c55b2f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7c55b2f. Configure here.
Stricli always provides aliases at runtime (empty array when none), but type it as optional and use ?? [] for defensive safety per Seer and BugBot review feedback.
7c55b2f to
a9c4c37
Compare

Summary
src/lib/route-map.tsas the single entry point for building Stricli route maps — analogous to howsrc/lib/command.tswrapsbuildCommandlist→ls,view→show,delete→remove/rm,create→newindex.tsfiles andapp.tsto import from the wrapper instead of@stricli/coredirectlygetSubcommandsForRoute()inlist-command.tsto collect subcommand aliases so plural+alias combos likesentry issues lsare properly intercepted